package com.cdy.controller;


import com.cdy.entity.Teacher;
import com.cdy.service.ITeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 崔德渊
 * @since 2022-03-08
 */
@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @Autowired
    private ITeacherService iTeacherService;

    @GetMapping("/")
    public List<Teacher> selectAll(){
        List<Teacher> list = iTeacherService.list();
        return list;
    }

}

